<template>
  <div class="myTable">
    <table border>
       <thead>
           <tr>
               <th>姓名</th>
               <th>年龄</th>
               <th>爱好</th>
               <th>操作</th>
           </tr>
       </thead>
       <tbody>
           <tr v-for="(item,index) in tableData" :key="index">
               <td>{{item.name}}</td>
               <td>{{item.age}}</td>
               <td>{{item.hobby}}</td>
               <td>
                  <slot name="action" :i="index"></slot>
               </td>
           </tr>
       </tbody>
    </table>
  </div>
</template>

<script>

export default {
  props:{
    tableData: Array
  },
  setup() {},
};
</script>
<style lang="scss" scoped>
</style>